#ifndef _BUOLA_WIDGETS_CCHECKBOX_H_
#define _BUOLA_WIDGETS_CCHECKBOX_H_

#include <buola/widgets/ccheckwidget.h>

namespace buola { namespace gui {

///\addtogroup widgets
///@{

////////////////////////////////////////////////////////////////////////////

/// check box

///
///
///
////////////////////////////////////////////////////////////////////////////

class CCheckBox : public CCheckWidget
{
public:
///\name constructor and destructor
//@{
    CCheckBox();
    virtual ~CCheckBox();
//@}

    ///sets the caption to display for the box
    void SetCaption(const std::wstring &pCaption);

    //! returns the caption to display for the box
    const std::wstring &Caption()    {   return mCaption;    }

private:
//! \name event handlers
//@{
    virtual void OnExpose(const CExposeEvent &pE);
    virtual void OnButtonDown(const CMouseEvent &pE);
    virtual void OnButtonUp(const CMouseEvent &pE);
    virtual void OnFocusIn(const CFocusEvent &pE);
    virtual void OnFocusOut(const CFocusEvent &pE);
    virtual void OnKeyDown(const CKeyEvent &pE);
    virtual void OnStyleChanged(TStyle);

    virtual void OnCWChecked();
//@}

protected:
    bool mPressed;
    std::wstring mCaption;
};

///@}

/*namespace gui*/ } /*namespace buola*/ }

#endif
